package com.ruoyi.ui.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.ui.mapper.UiBannerMapper;
import com.ruoyi.ui.domain.UiBanner;
import com.ruoyi.ui.service.IUiBannerService;

/**
 * 轮播图Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-09-06
 */
@Service
public class UiBannerServiceImpl implements IUiBannerService 
{
    @Autowired
    private UiBannerMapper uiBannerMapper;

    /**
     * 查询轮播图
     * 
     * @param bannerId 轮播图主键
     * @return 轮播图
     */
    @Override
    public UiBanner selectUiBannerByBannerId(Long bannerId)
    {
        return uiBannerMapper.selectUiBannerByBannerId(bannerId);
    }

    /**
     * 查询轮播图列表
     * 
     * @param uiBanner 轮播图
     * @return 轮播图
     */
    @Override
    public List<UiBanner> selectUiBannerList(UiBanner uiBanner)
    {
        return uiBannerMapper.selectUiBannerList(uiBanner);
    }

    /**
     * 新增轮播图
     * 
     * @param uiBanner 轮播图
     * @return 结果
     */
    @Override
    public int insertUiBanner(UiBanner uiBanner)
    {
        return uiBannerMapper.insertUiBanner(uiBanner);
    }

    /**
     * 修改轮播图
     * 
     * @param uiBanner 轮播图
     * @return 结果
     */
    @Override
    public int updateUiBanner(UiBanner uiBanner)
    {
        return uiBannerMapper.updateUiBanner(uiBanner);
    }

    /**
     * 批量删除轮播图
     * 
     * @param bannerIds 需要删除的轮播图主键
     * @return 结果
     */
    @Override
    public int deleteUiBannerByBannerIds(Long[] bannerIds)
    {
        return uiBannerMapper.deleteUiBannerByBannerIds(bannerIds);
    }

    /**
     * 删除轮播图信息
     * 
     * @param bannerId 轮播图主键
     * @return 结果
     */
    @Override
    public int deleteUiBannerByBannerId(Long bannerId)
    {
        return uiBannerMapper.deleteUiBannerByBannerId(bannerId);
    }
}
